package com.cq.hd.product.api;

import com.cq.hd.common.response.Result;
import com.cq.hd.product.api.dto.ActiveShareStatisticsDto;
import com.cq.hd.product.api.vo.ActiveAgentShareCountVo;
import com.cq.hd.product.api.vo.ActiveShareRecordVo;
import com.cq.hd.product.api.vo.ActiveShareStatisticsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "hd-o2o-product-service", contextId = "active-share-api")
public interface TbActiveShareApi {

    // 根据分享码查询活动分享记录数据
    @GetMapping("/product/activeShare/getByCode")
    Result<ActiveShareRecordVo> getByCode(@RequestParam("code") String code, @RequestParam("activeId") Long activeId);

    // 根据条件查询活动分享数据
    @GetMapping("/product/activeShare/listByDto")
    Result<List<ActiveShareStatisticsVo>> listByDto(@SpringQueryMap ActiveShareStatisticsDto activeShareStatisticsDto);

    // 活动经纪人分享次数
    @GetMapping("/product/activeShare/getAgentShareCountByActiveIds")
    Result<List<ActiveAgentShareCountVo>> getAgentShareCountByActiveIds(@RequestParam("activeIds") List<Long> activeIds);
}
